package com.wtwd.campus.jdzc.dao;

import com.wtwd.campus.entity.DeviceInfo;
import com.wtwd.campus.entity.DeviceSetting;
import com.wtwd.campus.entity.ThirdPartDeviceVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface JdzcDeviceSettingMapper {
    //根据设备id查询一条设置信息
    DeviceSetting getDeviceSettingByImei(String imei);
    //设置设备信息
    Integer modifyDeviceSetting(@Param("data") DeviceSetting data);

    DeviceSetting getDeviceSettingByDeviceId(@Param("deviceId") Integer deviceId);

    Integer addDeviceSetting(@Param("deviceSetting") DeviceSetting deviceSetting);

    /**
     *初始化设备设置表
     * @param deviceInfos
     * @return
     */
    Integer batchInitializeDeviceSetting(@Param("list") List<DeviceInfo> deviceInfos);

    Integer delDeviceSettingByDeviceId(@Param("deviceId") Integer deviceId);

    List<Map<String,Object>> getH5ThirdPartDeviceList(@Param("data") ThirdPartDeviceVO data);

    List<Map<String,Object>> getOtherThirdPartDeviceList(@Param("data") ThirdPartDeviceVO data);

    int deleteSOSList(@Param("deviceId") Integer deviceId);

    int modifySilentSwitchByDeviceId(@Param("deviceId") Integer deviceId, @Param("flag") Integer flag);
}
